<div class="widget-content padded">
	<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',
			array(
					'method' => 'post',
					'htmlOptions' => array (
					'class'=>"form-horizontal",
					'enctype'=>'multipart/form-data'
					 )
					)); ?>
	<form action="#" >
		<div class="form-group">
			<?php echo $form->labelEx($banner_model,'Banner_Label',array('class'=>'control-label col-md-2')); ?>
			<div class="col-md-7">
				<?php echo $form->textField($banner_model,'Banner_Label',array('placeholder'=>'标题','class'=>'form-control')); ?>
				<?php echo $form->error($banner_model,'Banner_Label'); ?>
			</div>
		</div>
		
		<div class="form-group">
			<?php echo $form->labelEx($banner_model,'Banner_Url',array('class'=>'control-label col-md-2')); ?>
			<div class="col-md-7">
				<?php echo $form->textField($banner_model,'Banner_Url',array('placeholder'=>'跳转URL','class'=>'form-control')); ?>
				<?php echo $form->error($banner_model,'Banner_Url'); ?>
			</div>
		</div>

		<div class="form-group">
			<label class="control-label col-md-2">轮播顺序</label>
			<div class="col-md-7">
			
				<?php foreach($banner_model -> getOdrList() as $_list):?>
					<?php if($banner_model -> Banner_Odr == $_list): ?>
						<label class="radio-inline"> 
							<input name="Banner[Banner_Odr]" type="radio" value="<?php echo $_list?>" checked="" /><span><?php echo $_list?></span>
						</label>
					<?php else:?>
						<label class="radio-inline"> 
							<input name="Banner[Banner_Odr]" type="radio" value="<?php echo $_list?>" /><span><?php echo $_list?></span>
						</label> 
					<?php endif;?>
				<?php endforeach;?>
				
			</div>
		</div>

		<div class="form-group">
			<?php echo $form->labelEx($banner_model,'Banner_Text',array('class'=>'control-label col-md-2')); ?>
			<div class="col-md-7">
				<?php echo $form->textArea($banner_model,'Banner_Text',array('placeholder'=>'内容','class'=>'form-control')); ?>
				<?php echo $form->error($banner_model,'Banner_Text'); ?>
			</div>
		</div>

		<div class="form-group">
			<?php echo $form->labelEx($banner_model,'Banner_Img',array('class'=>'control-label col-md-2')); ?>
			<div class="col-md-4">
				<div class="fileupload fileupload-new" data-provides="fileupload">
					<input type="hidden">
					<div class="input-group">
	                  <div class="form-control">
	                    <i class="icon-file fileupload-exists"></i>
	                    <span class="fileupload-preview"></span>
	                  </div>
	                  <div class="input-group-btn">
	                    <a class="btn btn-default fileupload-exists" data-dismiss="fileupload" href="#">Remove</a>
	                    <span class="btn btn-default btn-file">
	                    <span class="fileupload-new">Select file</span>
	                    <span class="fileupload-exists">Change</span>
	                    <?php echo $form -> fileField($banner_model,'Banner_Img')?>
	                  </div>
	                </div>
					<div style="margin-top:20px;">
						<?php if($banner_model -> isNewRecord):?>
						<button class="btn btn-primary" type="submit">保存</button>
						<?php else:?>
						<button class="btn btn-primary" type="submit">修改</button>
						<?php endif;?>
					</div>
				</div>
			</div>
		</div>
	<?php $this->endWidget(); ?>
	
</div>